package com.itheima.writer;

import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.StandardCharsets;

/*
创建直接指定字符集 的 输出流
 */
public class Demo02 {

    public static void main(String[] args) throws IOException {
        Charset uft8 = Charset.forName("utf-8");
        FileWriter writer = new FileWriter("day13\\aaa\\abc.txt", uft8,true);

        writer.write("嘿嘿嘿,我最帅");
        writer.write("\r\n");
        writer.close();

    }
}
